// index.js
// 获取应用实例
const app = getApp()

Page({
  data: {
   item:0,
   tab:0,
   playlist: [{
    id: 1, title: '赤伶', singer: "赤伶", src: 'http://192.168.0.105:3000/赤伶.mp3',
    coverImgUrl: '/images/cover.jpg'
  },
  {
    id: 1, title: '晴朗', singer: "晴朗", src: 'http://192.168.0.105:3000/晴朗.mp3',
    coverImgUrl: '/images/cover.jpg'
  }],
  state: 'paused',
  playIndex: 0,
  play: {
    currentTime: '00:00',
    duration: '00:00',
    percent: 19,
    title: '你好',
    singer: 'hello',
    coverImgUrl: '/images/cover.jpg'
  }
  },
  changeItem(e){
this.setData({
  tab:e.target.dataset.item,
item:e.target.dataset.item
})
  },
  changeTab(e){
    this.setData({
      tab:e.detail.current
    })
  }
  ,
  // 事件处理函数
  bindViewTap() {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  onLoad() {

  }

})
